<?php

ini_set('include_path', 'C:\webdev\malibrary');

require_once 'Base/List.php';

class Item {
	private $_name = '';
	public function __construct($name) { $this->_name = $name;	}
	public function getName() {	return $this->_name; }
}

$list = new Base_List();

$list->attach(new Item('a'))->attach(new Item('b'))->attach(new Item('c'));
$list->prepend(new Item('d'), 'key')->prepend(new Item('e'));

echo $list->first()->getName() . "\n";
echo $list->last()->getName() . "\n";

foreach ($list as $item)
{
	echo $item->getName() . "\n";
}

echo count($list);

